package com.mywang.weitravel.modules.manbushanghai;

import android.content.Intent;
import android.view.View;
import android.widget.ImageView;
import android.widget.TextView;

import com.mywang.weitravel.R;
import com.mywang.weitravel.base.BaseActivity;
import com.mywang.weitravel.base.BaseContract;

import butterknife.BindView;
import butterknife.OnClick;

public class ShangHaiActivity extends BaseActivity {

    @BindView(R.id.iv_title_back)
    ImageView ivTitleBack;
    @BindView(R.id.tv_title)
    TextView tvTitle;
    @BindView(R.id.iv_waitan)
    ImageView ivWaitan;
    @BindView(R.id.iv_rmgc)
    ImageView ivRmgc;
    @BindView(R.id.iv_dfmz)
    ImageView ivDfmz;
    @BindView(R.id.iv_lhs)
    ImageView ivLhs;
    @BindView(R.id.iv_xjh)
    ImageView ivXjh;
    @BindView(R.id.iv_yuyuan)
    ImageView ivYuyuan;

    @Override
    protected void initView() {
        tvTitle.setText("漫步上海");
    }

    @Override
    protected BaseContract.IPresenter initPresenter() {
        return null;
    }

    @Override
    protected int getActivityLayoutID() {
        return R.layout.activity_shanghai;
    }


    @OnClick({R.id.iv_title_back, R.id.iv_waitan, R.id.iv_rmgc, R.id.iv_dfmz, R.id.iv_lhs, R.id.iv_xjh, R.id.iv_yuyuan})
    public void onViewClicked(View view) {
        if (view.getId() == R.id.iv_title_back) {
            finish();
            return;
        }

        Intent intent = new Intent(ShangHaiActivity.this, WebViewActivity.class);
        switch (view.getId()) {
            case R.id.iv_waitan:
                intent.putExtra(WebViewActivity.TITLE_NAME, "外滩");
                intent.putExtra(WebViewActivity.NAME_URL, "http://www.tu960.com/v2/b/12n4uo/");
                break;
            case R.id.iv_rmgc:
                intent.putExtra(WebViewActivity.TITLE_NAME, "人民广场");
                intent.putExtra(WebViewActivity.NAME_URL, "http://www.tu960.com/v2/b/izlj3m/");
                break;
            case R.id.iv_dfmz:
                intent.putExtra(WebViewActivity.TITLE_NAME, "东方明珠");
                intent.putExtra(WebViewActivity.NAME_URL, "http://www.tu960.com/v2/b/oann5q/");
                break;
            case R.id.iv_lhs:
                intent.putExtra(WebViewActivity.TITLE_NAME, "龙华寺");
                intent.putExtra(WebViewActivity.NAME_URL, "http://www.tu960.com/v2/b/zysnfv/");
                break;

            case R.id.iv_xjh:
                intent.putExtra(WebViewActivity.TITLE_NAME, "徐家汇");
                intent.putExtra(WebViewActivity.NAME_URL, "http://www.tu960.com/v2/b/ctkihh/");
                break;
            case R.id.iv_yuyuan:
                intent.putExtra(WebViewActivity.TITLE_NAME, "豫园");
                intent.putExtra(WebViewActivity.NAME_URL, "http://www.tu960.com/v2/b/xhq0cs/");
                break;
        }
        startActivity(intent);
    }
}
